package org.bt4girls.common.model.result;

import lombok.Data;


public enum ErrorCode {
    REQUEST_SUCCESS(200,"请求成功"),
    REQUEST_FAIL(500,"服务器处理错误，请稍后再试"),
    REQUEST_PARAM_ERROR(-1,"请求参数异常"),

    /* oauth error code 100 000 - 199 999 */
    OAUTH_USER_NO_EXIST_OR_PWD_ERROR(100000,"用户不存在或账号密码错误"),
    PERMISSION_IS_EXIST(100001,"权限已存在，请检查后重新尝试"),
    ROLE_IS_EXIST(100002,"角色已存在，请检查后重新尝试"),
    ;

    private int code;
    private String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
